package com.zsy.mapper;

import com.zsy.pojo.Student;
import com.zsy.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {
    List<Student> queryStudent(StudentQueryParam studentQueryParam);

    void addStudent(Student student);

    Student queryStudentById(Integer id);

    void updateStudent(Student student);

    void deleteByIds(List<Integer> ids);

    void updateViolationStu(@Param("id") Integer id, @Param("violationCount") short violationCount, @Param("violationScore") int score , @Param("updateTime")LocalDateTime updateTime);
    @MapKey("name")
    List<Map> getStudentCountData();

    List<Map> getStudentDegreeData();
}
